# 作者: YYJ
# 2025年07月27日13时23分03秒
# 2486249622@qq.com

from functools import wraps


def my_decorator(func):
    def wper(*args, **kwargs):
        '''decorator'''
        print('Calling decorated function...')
        return func(*args, **kwargs)

    return wper


@my_decorator
def example():
    """Docstring"""
    print('Called example function')
    print(example.__name__, example.__doc__)  # wper decorator


def my_decorator(func):
    @wraps(func)    # 保留原函数的属性
    def wper(*args, **kwargs):
        '''decorator'''
        print('Calling decorated function...')
        return func(*args, **kwargs)

    return wper


@my_decorator
def example():
    """Docstring"""
    print('Called example function')
    print(example.__name__, example.__doc__)  # example Docstring


if __name__ == '__main__':
    example()
